
export default {
  props: {
    layoutType: {
      type: String,
      default: ''
    },
    list: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      imgHost: `${process.env.VUE_APP_STATIC}`
    }
  },

  computed: {
    appRoleList() {
      const user = this.$store.getters.userInfo || {}
      const roles = (user && user.appRoleDTOList) || []
      return roles.map(v => v.roleName)
    }
  },
  methods: {
    clickHandle(item) {
      /* // TODO：仅针对2023年会入口特定配置====start====
      if (item.name === '2023年会权限入口') {
        const flag = this.appRoleList.some(name => name === '2023年会权限角色')
        if (!flag) {
          this.$toast('年会新品即将重磅推出，敬请期待')
          return
        }
      }
      // ============end======= */
      item.routerTitle = item.name
      this.$gotoPage(item, this.$router, true)
    }
  }
}
